NanoPBOptionsOrBuilder

interface NanoPBOptionsOrBuilder : MessageOrBuilder

Inheritors

Functions

Link copied to clipboard
abstract fun getAnonymousOneof(): Boolean
decode oneof as anonymous union
optional bool anonymous_oneof = 11 [default = false];
Link copied to clipboard
abstract fun getCallbackDatatype(): String
Data type for storage associated with callback fields.
optional string callback_datatype = 18 [default = "pb_callback_t"];
Link copied to clipboard
abstract fun getCallbackDatatypeBytes(): ByteString
Data type for storage associated with callback fields.
optional string callback_datatype = 18 [default = "pb_callback_t"];
Link copied to clipboard
abstract fun getCallbackFunction(): String
Callback function used for encoding and decoding.
Prior to nanopb-0.4.0, the callback was specified in per-field pb_callback_t
structure. This is still supported, but does not work inside e.g. oneof or pointer
fields. Instead, a new method allows specifying a per-message callback that
will be called for all callback fields in a message type.
optional string callback_function = 19 [default = "pb_default_field_callback"];
Link copied to clipboard
abstract fun getCallbackFunctionBytes(): ByteString
Callback function used for encoding and decoding.
Prior to nanopb-0.4.0, the callback was specified in per-field pb_callback_t
structure. This is still supported, but does not work inside e.g. oneof or pointer
fields. Instead, a new method allows specifying a per-message callback that
will be called for all callback fields in a message type.
optional string callback_function = 19 [default = "pb_default_field_callback"];
Link copied to clipboard
abstract fun getDefaultHas(): Boolean
Set default value for has_ fields.
optional bool default_has = 23 [default = false];
Link copied to clipboard
Select the size of field descriptors. This option has to be defined
for the whole message, not per-field. Usually automatic selection is
ok, but if it results in compilation errors you can increase the field
size here.
optional .DescriptorSize descriptorsize = 20 [default = DS_AUTO];
Link copied to clipboard
abstract fun getEnumToString(): Boolean
Generate an enum->string mapping function (can take up lots of space).
optional bool enum_to_string = 13 [default = false];
Link copied to clipboard
abstract fun getExclude(index: Int): String
Automatic includes to exclude from generated `.pb.h`
Same as nanopb_generator.py command line flag -x.
repeated string exclude = 26;
Link copied to clipboard
abstract fun getExcludeBytes(index: Int): ByteString
Automatic includes to exclude from generated `.pb.h`
Same as nanopb_generator.py command line flag -x.
repeated string exclude = 26;
Link copied to clipboard
abstract fun getExcludeCount(): Int
Automatic includes to exclude from generated `.pb.h`
Same as nanopb_generator.py command line flag -x.
repeated string exclude = 26;
Link copied to clipboard
abstract fun getExcludeList(): List<String>
Automatic includes to exclude from generated `.pb.h`
Same as nanopb_generator.py command line flag -x.
repeated string exclude = 26;
Link copied to clipboard
Set the FT_DEFAULT field conversion strategy.
A field that can become a static member of a c struct (e.g. int, bool, etc)
will be a a static field.
Fields with dynamic length are converted to either a pointer or a callback.
optional .FieldType fallback_type = 29 [default = FT_CALLBACK];
Link copied to clipboard
abstract fun getFixedCount(): Boolean
Generate repeated field with fixed count
optional bool fixed_count = 16 [default = false];
Link copied to clipboard
abstract fun getFixedLength(): Boolean
Generate bytes arrays with fixed length
optional bool fixed_length = 15 [default = false];
Link copied to clipboard
abstract fun getInclude(index: Int): String
Extra files to include in generated `.pb.h`
repeated string include = 24;
Link copied to clipboard
abstract fun getIncludeBytes(index: Int): ByteString
Extra files to include in generated `.pb.h`
repeated string include = 24;
Link copied to clipboard
abstract fun getIncludeCount(): Int
Extra files to include in generated `.pb.h`
repeated string include = 24;
Link copied to clipboard
abstract fun getIncludeList(): List<String>
Extra files to include in generated `.pb.h`
repeated string include = 24;
Link copied to clipboard
abstract fun getIntSize(): Nanopb.IntSize
Size of integer fields. Can save some memory if you don't need
full 32 bits for the value.
optional .IntSize int_size = 7 [default = IS_DEFAULT];
Link copied to clipboard
abstract fun getLongNames(): Boolean
Use long names for enums, i.e. EnumName_EnumValue.
optional bool long_names = 4 [default = true];
Link copied to clipboard
Shorten or remove package names from type names.
This option applies only on the file level.
optional .TypenameMangling mangle_names = 17 [default = M_NONE];
Link copied to clipboard
abstract fun getMaxCount(): Int
Allocated number of entries in arrays ('repeated' fields)
optional int32 max_count = 2;
Link copied to clipboard
abstract fun getMaxLength(): Int
Maximum length for 'string' fields. Setting this is equivalent
to setting max_size to a value of length+1.
optional int32 max_length = 14;
Link copied to clipboard
abstract fun getMaxSize(): Int
Allocated size for 'bytes' and 'string' fields.
For string fields, this should include the space for null terminator.
optional int32 max_size = 1;
Link copied to clipboard
abstract fun getMsgid(): Int
integer type tag for a message
optional uint32 msgid = 9;
Link copied to clipboard
abstract fun getNoUnions(): Boolean
Generate oneof fields as normal optional fields instead of union.
optional bool no_unions = 8 [default = false];
Link copied to clipboard
abstract fun getPackage(): String
Package name that applies only for nanopb.
optional string package = 25;
Link copied to clipboard
abstract fun getPackageBytes(): ByteString
Package name that applies only for nanopb.
optional string package = 25;
Link copied to clipboard
abstract fun getPackedEnum(): Boolean
Add 'packed' attribute to generated enums.
optional bool packed_enum = 10 [default = false];
Link copied to clipboard
abstract fun getPackedStruct(): Boolean
Add 'packed' attribute to generated structs.
Note: this cannot be used on CPUs that break on unaligned
accesses to variables.
optional bool packed_struct = 5 [default = false];
Link copied to clipboard
abstract fun getProto3(): Boolean
Proto3 singular field does not generate a "has_" flag
optional bool proto3 = 12 [default = false];
Link copied to clipboard
Force proto3 messages to have no "has_" flag.
This was default behavior until nanopb-0.4.0.
optional bool proto3_singular_msgs = 21 [default = false];
Link copied to clipboard
abstract fun getSkipMessage(): Boolean
Skip this message
optional bool skip_message = 6 [default = false];
Link copied to clipboard
abstract fun getSortByTag(): Boolean
Due to historical reasons, nanopb orders fields in structs by their tag number
instead of the order in .proto. Set this to false to keep the .proto order.
The default value will probably change to false in nanopb-0.5.0.
optional bool sort_by_tag = 28 [default = true];
Link copied to clipboard
abstract fun getSubmsgCallback(): Boolean
Generate message-level callback that is called before decoding submessages.
This can be used to set callback fields for submsgs inside oneofs.
optional bool submsg_callback = 22 [default = false];
Link copied to clipboard
abstract fun getType(): Nanopb.FieldType
Force type of field (callback or static allocation)
optional .FieldType type = 3 [default = FT_DEFAULT];
Link copied to clipboard
abstract fun getTypeOverride(): DescriptorProtos.FieldDescriptorProto.Type
Override type of the field in generated C code. Only to be used with related field types
optional .google.protobuf.FieldDescriptorProto.Type type_override = 27;
Link copied to clipboard
abstract fun hasAnonymousOneof(): Boolean
decode oneof as anonymous union
optional bool anonymous_oneof = 11 [default = false];
Link copied to clipboard
Data type for storage associated with callback fields.
optional string callback_datatype = 18 [default = "pb_callback_t"];
Link copied to clipboard
Callback function used for encoding and decoding.
Prior to nanopb-0.4.0, the callback was specified in per-field pb_callback_t
structure. This is still supported, but does not work inside e.g. oneof or pointer
fields. Instead, a new method allows specifying a per-message callback that
will be called for all callback fields in a message type.
optional string callback_function = 19 [default = "pb_default_field_callback"];
Link copied to clipboard
abstract fun hasDefaultHas(): Boolean
Set default value for has_ fields.
optional bool default_has = 23 [default = false];
Link copied to clipboard
abstract fun hasDescriptorsize(): Boolean
Select the size of field descriptors. This option has to be defined
for the whole message, not per-field. Usually automatic selection is
ok, but if it results in compilation errors you can increase the field
size here.
optional .DescriptorSize descriptorsize = 20 [default = DS_AUTO];
Link copied to clipboard
abstract fun hasEnumToString(): Boolean
Generate an enum->string mapping function (can take up lots of space).
optional bool enum_to_string = 13 [default = false];
Link copied to clipboard
abstract fun hasFallbackType(): Boolean
Set the FT_DEFAULT field conversion strategy.
A field that can become a static member of a c struct (e.g. int, bool, etc)
will be a a static field.
Fields with dynamic length are converted to either a pointer or a callback.
optional .FieldType fallback_type = 29 [default = FT_CALLBACK];
Link copied to clipboard
abstract fun hasFixedCount(): Boolean
Generate repeated field with fixed count
optional bool fixed_count = 16 [default = false];
Link copied to clipboard
abstract fun hasFixedLength(): Boolean
Generate bytes arrays with fixed length
optional bool fixed_length = 15 [default = false];
Link copied to clipboard
abstract fun hasIntSize(): Boolean
Size of integer fields. Can save some memory if you don't need
full 32 bits for the value.
optional .IntSize int_size = 7 [default = IS_DEFAULT];
Link copied to clipboard
abstract fun hasLongNames(): Boolean
Use long names for enums, i.e. EnumName_EnumValue.
optional bool long_names = 4 [default = true];
Link copied to clipboard
abstract fun hasMangleNames(): Boolean
Shorten or remove package names from type names.
This option applies only on the file level.
optional .TypenameMangling mangle_names = 17 [default = M_NONE];
Link copied to clipboard
abstract fun hasMaxCount(): Boolean
Allocated number of entries in arrays ('repeated' fields)
optional int32 max_count = 2;
Link copied to clipboard
abstract fun hasMaxLength(): Boolean
Maximum length for 'string' fields. Setting this is equivalent
to setting max_size to a value of length+1.
optional int32 max_length = 14;
Link copied to clipboard
abstract fun hasMaxSize(): Boolean
Allocated size for 'bytes' and 'string' fields.
For string fields, this should include the space for null terminator.
optional int32 max_size = 1;
Link copied to clipboard
abstract fun hasMsgid(): Boolean
integer type tag for a message
optional uint32 msgid = 9;
Link copied to clipboard
abstract fun hasNoUnions(): Boolean
Generate oneof fields as normal optional fields instead of union.
optional bool no_unions = 8 [default = false];
Link copied to clipboard
abstract fun hasPackage(): Boolean
Package name that applies only for nanopb.
optional string package = 25;
Link copied to clipboard
abstract fun hasPackedEnum(): Boolean
Add 'packed' attribute to generated enums.
optional bool packed_enum = 10 [default = false];
Link copied to clipboard
abstract fun hasPackedStruct(): Boolean
Add 'packed' attribute to generated structs.
Note: this cannot be used on CPUs that break on unaligned
accesses to variables.
optional bool packed_struct = 5 [default = false];
Link copied to clipboard
abstract fun hasProto3(): Boolean
Proto3 singular field does not generate a "has_" flag
optional bool proto3 = 12 [default = false];
Link copied to clipboard
Force proto3 messages to have no "has_" flag.
This was default behavior until nanopb-0.4.0.
optional bool proto3_singular_msgs = 21 [default = false];
Link copied to clipboard
abstract fun hasSkipMessage(): Boolean
Skip this message
optional bool skip_message = 6 [default = false];
Link copied to clipboard
abstract fun hasSortByTag(): Boolean
Due to historical reasons, nanopb orders fields in structs by their tag number
instead of the order in .proto. Set this to false to keep the .proto order.
The default value will probably change to false in nanopb-0.5.0.
optional bool sort_by_tag = 28 [default = true];
Link copied to clipboard
abstract fun hasSubmsgCallback(): Boolean
Generate message-level callback that is called before decoding submessages.
This can be used to set callback fields for submsgs inside oneofs.
optional bool submsg_callback = 22 [default = false];
Link copied to clipboard
abstract fun hasType(): Boolean
Force type of field (callback or static allocation)
optional .FieldType type = 3 [default = FT_DEFAULT];
Link copied to clipboard
abstract fun hasTypeOverride(): Boolean
Override type of the field in generated C code. Only to be used with related field types
optional .google.protobuf.FieldDescriptorProto.Type type_override = 27;